/**
 * A class used to perform RPCs to the server.
 * @constructor
 * @extends {lib.net.Xhr}
 * @param {String} url The URL to send the calls to.
 */
lib.net.Rpc = function(url) {
	lib.net.Xhr.call(this, lib.net.Method.POST, url);
};
lib.inherits(lib.net.Rpc, lib.net.Xhr);

/**
 * Invokes the RPC.
 * @param {String|Number} obj Object(s) to be passed to the RPC.
 */
lib.net.Rpc.prototype.send = function() {
	var params = {};
	params['numParams'] = arguments.length;
	
	for (var i=0, len=arguments.length; i<len; ++i) {
		params['param'+i] = arguments[i];
	}

	lib.net.Rpc.super_.send.call(this, params);
};
